#include "../User/Device/Power.h"

#include <stdint.h>

#include "../User/BSP/gpio.h"

void Power_Work() {
  static uint32_t counter = 0;
  if (counter > TASK_POWER_FREQ)
    counter = 0;
  else
    counter++;
  if (counter > TASK_POWER_FREQ / 2.0f)
    BSP_GPIO_WritePin(BSP_GPIO_BOARD_LED, BSP_GPIO_HIGH);
  else
    BSP_GPIO_WritePin(BSP_GPIO_BOARD_LED, BSP_GPIO_LOW);
}
